package com.lh.marketing.canvas.enums;

/**
 * 延迟类型
 */
public enum DelayTypeEnum {

    direct(1,"直接"),
    delay(2,"延迟"),
    cycle(3,"循环");

    public final Integer type;

    public final String remark;

    DelayTypeEnum(Integer type, String...remarks) {
        this.type = type;
        this.remark = remarks.length>0?remarks[0]:"";
    }

    public static DelayTypeEnum getByType(Integer type){
        if(type == null){
            return direct;
        }
        for (DelayTypeEnum pe : DelayTypeEnum.values()) {
            if(pe.type.equals(type)){
                return pe;
            }
        }
        return direct;
    }
}
